# 创建  openai助手 assistant

from dotenv import load_dotenv
from openai import OpenAI

load_dotenv()

client = OpenAI()
# 创建 assistant
assistant = client.beta.assistants.create(
    name=" 鲜花价格计算器 ",
    instructions=" 你能够帮我计算鲜花的价格 ", tools=[{"type": "code_interpreter"}],
    model="gpt-4-turbo-preview"
    )
# 打印 assistant print(assistant)
print(assistant)

# 助手id 是 asst_bJJ8EhdLviT0F8Gq0hVoxCua